<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>项目评级</title>
	<script type="text/javascript" src="__PUBLIC__/home/js/jquery-1.10.2.min.js"></script>
	<link href="__PUBLIC__/validform/Validform.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__PUBLIC__/validform/Validform_v5.3.2.js"></script>
	<script type="text/javascript" src="__PUBLIC__/validform/Validform_Datatype.js"></script>
</head>
<body>
	<form id="rateform" name="rateform" action="{:U('test/handscore',array('item_id'=>$iteminfo['item_id']))}" method="post">
		<volist name="rateinfo" id="topcate" key="k">
			{$k}、{$topcate.top_name}<br>
				<volist name="topcate.subcate" id="subcate" key="key">
				{$subcate.sub_name}<br>
				<if condition="$subcate.sub_type eq '1' "><!--单选-->
					<volist name="subcate.threecate" id="threecate">
					<label><input name="info[{$subcate.sub_id}]" type="radio" value="{$threecate.three_id}" disabled <if condition="$rate[$threecate['three_id']]['rate_value'] eq '1' ">checked</if>/>{$threecate.three_name}<input name="rate[{$rate[$threecate['three_id']]['rate_id']}]" type="text" value="{$rate[$threecate['three_id']]['rate_score']}" <if condition="$rate[$threecate['three_id']]['rate_value'] eq '0' ">readonly style="display:none;"</if>  datatype="*" errormsg="不能为空！" /></label>&nbsp;&nbsp;&nbsp;
					</volist>
				<elseif condition="$subcate.sub_type eq '2' " /><!--多选-->
					<volist name="subcate.threecate" id="threecate">
					<label><input name="info[{$subcate.sub_id}][]" type="checkbox" value="{$threecate.three_id}" disabled <if condition="$rate[$threecate['three_id']]['rate_value'] eq '1' ">checked</if>/>{$threecate.three_name}<input name="rate[{$rate[$threecate['three_id']]['rate_id']}]" type="text" value="{$rate[$threecate['three_id']]['rate_score']}" <if condition="$rate[$threecate['three_id']]['rate_value'] eq '0' ">readonly style="display:none;"</if> datatype="*" errormsg="不能为空！" /></label>&nbsp;&nbsp;&nbsp;
					</volist>
				<elseif condition="$subcate.sub_type eq '3' " /><!--输入填写-->
					<volist name="subcate.threecate" id="threecate">
					{$threecate.three_name}:<input name="info[{$subcate.sub_id}][{$threecate.three_id}]" type="text" value="{$rate[$threecate['three_id']]['rate_value']}" readonly /><input name="rate[{$rate[$threecate['three_id']]['rate_id']}]" type="text" value="{$rate[$threecate['three_id']]['rate_score']}" datatype="*" errormsg="不能为空！" /><br>
					</volist>
				</if>
				<br>
				</volist>
		<br>
		</volist>

		<br>
		<input type="submit" value="登录"/>
	</form>

	<script>
		$(function(){
			$(":text").keyup(function(){
				var v=$(this).val();
				$(this).attr("maxlength",5);
				$(this).val(v.replace(/[^\-?\d.]/g,''));
			});

			$("#rateform").Validform({
				tiptype:1
			});
		}); 
	</script>
</body>
</html>